package com.cheejee.goodscenter.module.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import com.cheejee.goodscenter.validated.InsertGroup;
import com.cheejee.goodscenter.validated.UpdateGroup;

public class SaleCount {
	@NotNull(message = "销售流水ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    @NotNull(message = "商品ID不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private Long goodsId;

    @NotNull(message = "SKUID不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private Long skuId;

    @NotNull(message = "销售数量不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private Integer num;

    private Date time;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", skuId=").append(skuId);
        sb.append(", num=").append(num);
        sb.append(", time=").append(time);
        sb.append("]");
        return sb.toString();
    }
}